Embodiments of the present invention are generally directed to asynchronous messaging methods, and more particularly, to a method of scoping an alias to a subset of queue partitions in an asynchronous messaging system.
Generally, an asynchronous messaging system handles messages addressed to a queue that may be hosted by a cluster and may have multiple partitions. A message may be routed to a dynamically chosen partition in order to achieve workload balancing of message traffic across the cluster. Also, the queue name may be qualified with the partition to use, therefore maintaining affinity between the producer of the message and the particular partition to which its messages should be sent (e.g., when producing a sequence of related messages that must be delivered to the same consumer and optionally must be processed in the same order that they were produced).
The qualification of partition by message producer or consumer is useful to support affine routing but it does not take into consideration the current or intended states of the servers that are hosting the partitions of the queue. The producers may be running as remote clients and thus have no visibility of such state. The administrator of the servers hosting the partitions of the queue or the consumers of messages from that queue may wish to take one server offline (e.g., for hardware or software maintenance or upgrade). Alternatively, the administrator may upgrade the version of consuming applications attached to one or more of the partitions of the queue. In either of these scenarios, the administrator may want to exclude some partitions from the set over which a message stream may be workload balanced. The administrator may have other reasons for wanting to route a message stream to a subset of partitions. There is no configuration entity that allows them to do this.
Therefore, example embodiments of the present invention provide scoping an alias to a subset of queue partitions.